package com.hsy.crm.web.domain.entity;

import com.hsy.crm.web.domain.cm.Validate;

import javax.persistence.Column;
import javax.persistence.Table;

@Table(name = "sys_account_detail")
public class AccountDetail extends BaseEntity {

    @Validate
    @Column(length = 20)
    private Long accountId;

    @Validate
    @Column(length = 11)
    private Integer originType;

    @Validate
    @Column(length = 20)
    private Long originId;

    /**
     * 单据金额
     */
    @Validate
    @Column(length = 20)
    private Long orderAmount;

    /**
     * 单据[盈利、亏损]金额   负数为亏损
     *
     *     进货  无盈利   无亏损
     * 进货退货  可盈利   可亏损
     *     售货  可盈利   可亏损
     * 售货退货  可盈利   可亏损
     *
     * 其它收入  盈利     无亏损
     * 其它支出  无盈利   亏损
     *
     *     盘存  可盈利   可亏损
     *     调拨  可盈利   可亏损
     *     拆装  可盈利   可亏损
     * 其它入库   盈利    无亏损
     * 其它出库  无盈利   亏损
     *
     * 成本调整  可盈利   可亏损
     */
    @Validate
    @Column(length = 20)
    private Long gainAmount;

    @Column(length = 20)
    @Validate
    private Long createTime;

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Integer getOriginType() {
        return originType;
    }

    public void setOriginType(Integer originType) {
        this.originType = originType;
    }

    public Long getOriginId() {
        return originId;
    }

    public void setOriginId(Long originId) {
        this.originId = originId;
    }

    public Long getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(Long orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Long getGainAmount() {
        return gainAmount;
    }

    public void setGainAmount(Long gainAmount) {
        this.gainAmount = gainAmount;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
}
